package ssi.peeno.util;

import java.util.Comparator;

import ssi.peeno.model.Message;

public class ByDistance implements Comparator {
	
	@Override
	public int compare(Object arg0, Object arg1) {
		Message m1 = (Message)arg0;
		Message m2 = (Message)arg1;
		return (int) (m1.getDistance() - m2.getDistance());
	}
}
